package com.eastjet.maintenance.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 保养项目表
 * @TableName device_mpw
 */
@TableName(value ="device_mpw")
@Data
public class DeviceMpw implements Serializable {
    /**
     * 保养项目编号
     */
    @TableId(type = IdType.AUTO)
    private Integer mpwId;

    /**
     * 保养项目名称
     */
    private String mpwName;

    /**
     * 保养项目编码
     */
    private String code;

    /**
     * 保养项目部位
     */
    private String mpwPart;

    /**
     * 保养项目级别编号
     */
    private String mpwLevelId;

    /**
     * 状态(0-启用 1-禁用)
     */
    private Integer mpwState;

    /**
     * 保养要求
     */
    private String mpwRequire;

    /**
     * 备注
     */
    private String notas;

    /**
     * 创建人
     */
    private String insertPerson;

    /**
     * 创建时间
     */
    private Date insertTime;

    /**
     * 更新人
     */
    private String updatePerson;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 逻辑删除
     */
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DeviceMpw other = (DeviceMpw) that;
        return (this.getMpwId() == null ? other.getMpwId() == null : this.getMpwId().equals(other.getMpwId()))
            && (this.getMpwName() == null ? other.getMpwName() == null : this.getMpwName().equals(other.getMpwName()))
            && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))
            && (this.getMpwPart() == null ? other.getMpwPart() == null : this.getMpwPart().equals(other.getMpwPart()))
            && (this.getMpwLevelId() == null ? other.getMpwLevelId() == null : this.getMpwLevelId().equals(other.getMpwLevelId()))
            && (this.getMpwState() == null ? other.getMpwState() == null : this.getMpwState().equals(other.getMpwState()))
            && (this.getMpwRequire() == null ? other.getMpwRequire() == null : this.getMpwRequire().equals(other.getMpwRequire()))
            && (this.getNotas() == null ? other.getNotas() == null : this.getNotas().equals(other.getNotas()))
            && (this.getInsertPerson() == null ? other.getInsertPerson() == null : this.getInsertPerson().equals(other.getInsertPerson()))
            && (this.getInsertTime() == null ? other.getInsertTime() == null : this.getInsertTime().equals(other.getInsertTime()))
            && (this.getUpdatePerson() == null ? other.getUpdatePerson() == null : this.getUpdatePerson().equals(other.getUpdatePerson()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getMpwId() == null) ? 0 : getMpwId().hashCode());
        result = prime * result + ((getMpwName() == null) ? 0 : getMpwName().hashCode());
        result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
        result = prime * result + ((getMpwPart() == null) ? 0 : getMpwPart().hashCode());
        result = prime * result + ((getMpwLevelId() == null) ? 0 : getMpwLevelId().hashCode());
        result = prime * result + ((getMpwState() == null) ? 0 : getMpwState().hashCode());
        result = prime * result + ((getMpwRequire() == null) ? 0 : getMpwRequire().hashCode());
        result = prime * result + ((getNotas() == null) ? 0 : getNotas().hashCode());
        result = prime * result + ((getInsertPerson() == null) ? 0 : getInsertPerson().hashCode());
        result = prime * result + ((getInsertTime() == null) ? 0 : getInsertTime().hashCode());
        result = prime * result + ((getUpdatePerson() == null) ? 0 : getUpdatePerson().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", mpwId=").append(mpwId);
        sb.append(", mpwName=").append(mpwName);
        sb.append(", code=").append(code);
        sb.append(", mpwPart=").append(mpwPart);
        sb.append(", mpwLevelId=").append(mpwLevelId);
        sb.append(", mpwState=").append(mpwState);
        sb.append(", mpwRequire=").append(mpwRequire);
        sb.append(", notas=").append(notas);
        sb.append(", insertPerson=").append(insertPerson);
        sb.append(", insertTime=").append(insertTime);
        sb.append(", updatePerson=").append(updatePerson);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", isDelete=").append(isDelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}